3.145 \(\int (a-a \sec ^2(c+d x))^3 \, dx\)

Optimal. Leaf size=56 \[ -\frac{a^3 \tan ^5(c+d x)}{5 d}+\frac{a^3 \tan ^3(c+d x)}{3 d}-\frac{a^3 \tan (c+d x)}{d}+a^3 x \]

[Out]

a^3*x - (a^3*Tan[c + d*x])/d + (a^3*Tan[c + d*x]^3)/(3*d) - (a^3*Tan[c + d*x]^5)/(5*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0385128, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4120, 3473, 8} \[ -\frac{a^3 \tan ^5(c+d x)}{5 d}+\frac{a^3 \tan ^3(c+d x)}{3 d}-\frac{a^3 \tan (c+d x)}{d}+a^3 x \]

Antiderivative was successfully verified.

[In]

Int[(a - a*Sec[c + d*x]^2)^3,x]

[Out]

a^3*x - (a^3*Tan[c + d*x])/d + (a^3*Tan[c + d*x]^3)/(3*d) - (a^3*Tan[c + d*x]^5)/(5*d)

Rule 4120

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \left (a-a \sec ^2(c+d x)\right )^3 \, dx &=-\left (a^3 \int \tan ^6(c+d x) \, dx\right )\\ &=-\frac{a^3 \tan ^5(c+d x)}{5 d}+a^3 \int \tan ^4(c+d x) \, dx\\ &=\frac{a^3 \tan ^3(c+d x)}{3 d}-\frac{a^3 \tan ^5(c+d x)}{5 d}-a^3 \int \tan ^2(c+d x) \, dx\\ &=-\frac{a^3 \tan (c+d x)}{d}+\frac{a^3 \tan ^3(c+d x)}{3 d}-\frac{a^3 \tan ^5(c+d x)}{5 d}+a^3 \int 1 \, dx\\ &=a^3 x-\frac{a^3 \tan (c+d x)}{d}+\frac{a^3 \tan ^3(c+d x)}{3 d}-\frac{a^3 \tan ^5(c+d x)}{5 d}\\ \end{align*}

Mathematica [A]  time = 0.03132, size = 58, normalized size = 1.04 \[ -a^3 \left (\frac{\tan ^5(c+d x)}{5 d}-\frac{\tan ^3(c+d x)}{3 d}-\frac{\tan ^{-1}(\tan (c+d x))}{d}+\frac{\tan (c+d x)}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a - a*Sec[c + d*x]^2)^3,x]

[Out]

-(a^3*(-(ArcTan[Tan[c + d*x]]/d) + Tan[c + d*x]/d - Tan[c + d*x]^3/(3*d) + Tan[c + d*x]^5/(5*d)))

________________________________________________________________________________________

Maple [A]  time = 0.026, size = 81, normalized size = 1.5 \begin{align*}{\frac{1}{d} \left ({a}^{3} \left ( dx+c \right ) -3\,{a}^{3}\tan \left ( dx+c \right ) -3\,{a}^{3} \left ( -2/3-1/3\, \left ( \sec \left ( dx+c \right ) \right ) ^{2} \right ) \tan \left ( dx+c \right ) +{a}^{3} \left ( -{\frac{8}{15}}-{\frac{ \left ( \sec \left ( dx+c \right ) \right ) ^{4}}{5}}-{\frac{4\, \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{15}} \right ) \tan \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a-a*sec(d*x+c)^2)^3,x)

[Out]

1/d*(a^3*(d*x+c)-3*a^3*tan(d*x+c)-3*a^3*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+a^3*(-8/15-1/5*sec(d*x+c)^4-4/15*se
c(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.04516, size = 109, normalized size = 1.95 \begin{align*} a^{3} x - \frac{{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{3}}{15 \, d} + \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3}}{d} - \frac{3 \, a^{3} \tan \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

a^3*x - 1/15*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x + c))*a^3/d + (tan(d*x + c)^3 + 3*tan(d*x + c)
)*a^3/d - 3*a^3*tan(d*x + c)/d

________________________________________________________________________________________

Fricas [A]  time = 0.48466, size = 167, normalized size = 2.98 \begin{align*} \frac{15 \, a^{3} d x \cos \left (d x + c\right )^{5} -{\left (23 \, a^{3} \cos \left (d x + c\right )^{4} - 11 \, a^{3} \cos \left (d x + c\right )^{2} + 3 \, a^{3}\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

1/15*(15*a^3*d*x*cos(d*x + c)^5 - (23*a^3*cos(d*x + c)^4 - 11*a^3*cos(d*x + c)^2 + 3*a^3)*sin(d*x + c))/(d*cos
(d*x + c)^5)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - a^{3} \left (\int \left (-1\right )\, dx + \int 3 \sec ^{2}{\left (c + d x \right )}\, dx + \int - 3 \sec ^{4}{\left (c + d x \right )}\, dx + \int \sec ^{6}{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)**2)**3,x)

[Out]

-a**3*(Integral(-1, x) + Integral(3*sec(c + d*x)**2, x) + Integral(-3*sec(c + d*x)**4, x) + Integral(sec(c + d
*x)**6, x))

________________________________________________________________________________________

Giac [A]  time = 1.17522, size = 72, normalized size = 1.29 \begin{align*} -\frac{3 \, a^{3} \tan \left (d x + c\right )^{5} - 5 \, a^{3} \tan \left (d x + c\right )^{3} - 15 \,{\left (d x + c\right )} a^{3} + 15 \, a^{3} \tan \left (d x + c\right )}{15 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a-a*sec(d*x+c)^2)^3,x, algorithm="giac")

[Out]

-1/15*(3*a^3*tan(d*x + c)^5 - 5*a^3*tan(d*x + c)^3 - 15*(d*x + c)*a^3 + 15*a^3*tan(d*x + c))/d